package com.wowo.ffms.controller;

import com.wowo.ffms.dao.AccountDao;
import com.wowo.ffms.entity.Account;
import com.wowo.ffms.service.UserService;
import com.wowo.ffms.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import javax.servlet.annotation.WebServlet;
import java.io.IOException;
import com.wowo.ffms.entity.User;
import java.util.List;

@WebServlet(urlPatterns = "/accountListServlet")
public class AccountListServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        doGet(request,response);
    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {

//        PrintWriter out = response.getWriter();
//        out.print(uname);
//        out.close();
        UserService userService = new UserService();
       // List<Account> accounts = userService.getPageAccounts(1,5);
       // request.setAttribute("users",accounts);
        request.getRequestDispatcher("/accound/list.jsp").forward(request,response);
    }
}
